import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import routes from './route'
import service from '../util/request'
import { Toast } from 'vant'
import NProgress from 'nprogress'
const router = createRouter({
  history: createWebHistory(),
  routes
})

router.beforeEach((to,from,next)=>{
  NProgress.start();
  next(true);
})
router.afterEach(()=>{
  NProgress.done();
})

export default router
